package com.wise.wing.activity.logic;

import com.bm.corelibs.logic.BaseLogic.NListener;
import com.wise.wing.bean.BaseData;
import com.wise.wing.constant.Urls;


public class FindTrucksManager extends BaseManager {
	public void getStyles(NListener<BaseData> l) {
		logic.edit().setUrl(Urls.GET_STYLES).setBaseClass(BaseData.class).setListener(l);
		logic.doPost();
//		BaseData baseData = new BaseData();
//		baseData.status = Constant.STATUS_OK;
//		MapData mapData = new MapData();
//		
//		List<TruckStyle1> styles = new ArrayList<TruckStyle1>();
//		TruckStyle1 style1 = new TruckStyle1();
//		style1.styleName = "砼车";
//		List<Price> prices1 = new ArrayList<Price>();
//		Price price11 = new Price();
//		price11.caditionName = "运输距离";
//		price11.cadition = "15公里以内";
//		price11.price = 30;
//		prices1.add(price11);
//		
//		Price price12 = new Price();
//		price12.caditionName = "运输距离";
//		price12.cadition = "30公里以内";
//		price12.price = 40;
//		prices1.add(price12);
//		
//		Price price13 = new Price();
//		price13.caditionName = "运输距离";
//		price13.cadition = "45公里以内";
//		price13.price = 50;
//		prices1.add(price13);
//		
//		style1.stylePrice = prices1;
//		styles.add(style1);
//		
//		TruckStyle1 style2 = new TruckStyle1();
//		style2.styleName = "车载泵";
//		List<Price> prices2 = new ArrayList<Price>();
//		Price price21 = new Price();
//		price21.caditionName = "车载泵类型";
//		price21.cadition = "高压";
//		price21.price = 40;
//		prices2.add(price21);
//		
//		Price price22 = new Price();
//		price22.caditionName = "车载泵类型";
//		price22.cadition = "普通";
//		price22.price = 30;
//		prices2.add(price22);
//		style2.stylePrice = prices2;
//		styles.add(style2);
//		
//		TruckStyle1 style3 = new TruckStyle1();
//		style3.styleName = "汽泵";
//		List<Price> prices3 = new ArrayList<Price>();
//		Price price31 = new Price();
//		price31.caditionName = "需求臂长";
//		price31.cadition = "37m - 42m";
//		price31.price = 30;
//		prices3.add(price31);
//		
//		Price price32 = new Price();
//		price32.caditionName = "需求臂长";
//		price32.cadition = "46m - 48m";
//		price32.price = 40;
//		prices3.add(price32);
//		
//		Price price33 = new Price();
//		price33.caditionName = "需求臂长";
//		price33.cadition = "50m - 52m";
//		price33.price = 50;
//		prices3.add(price33);
//		style3.stylePrice = prices3;
//		styles.add(style3);
//		
//		mapData.TruckStyleList = styles;
//		baseData.data = mapData;
//		l.onResponse(baseData);
	}
	
	public void submit(String dispatcherId, String style, String condition, String conditionName, long priceId, double volume, 
					double unitPrice, int count, String appointmentTime, int changeUnitPrice, String remarks, double sumPrice, NListener<BaseData> l) {
		
		logic.edit().resetAll()
			.addParam("dispatcherId", dispatcherId + "").addParam("style1", style).addParam("condition", condition).addParam("conditionName", conditionName)
			.addParam("priceId", priceId+"").addParam("volume", volume+"").addParam("count", count+"").addParam("appointmentTime", appointmentTime)
			.addParam("unitPrice", unitPrice+"").addParam("changeUnitPrice", changeUnitPrice+"").addParam("remarks", remarks).addParam("sumPrice", sumPrice+"")
			.setBaseClass(BaseData.class).setListener(l).setUrl(Urls.CREATE_ORDER);
		logic.doPost();
//		BaseData baseData = new BaseData();
//		baseData.status = Constant.STATUS_OK;
//		MapData data = new MapData();
//		data.orderId = 0;
//		baseData.data = data;
//		l.onResponse(baseData);
	}
}
